import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity()
export class OperationLog {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  userId: number;

  @Column()
  username: string;

  @Column()
  operation: string;

  @Column()
  method: string;

  @Column()
  path: string;

  @Column('json', { nullable: true })
  params: any;

  @Column('json', { nullable: true })
  result: any;

  @CreateDateColumn()
  createTime: Date;
} 